﻿using Authority.DataTransferObject.ActionAuthority;
using Authority.DataTransferObject.Role;
using Authority.DataTransferObject.User;
using Authority.IServices.Model.Action;
using Authority.IServices.Model.User;
using HelperFromTheSkeleton.Model.PageModel;

namespace Authority.IServices
{
    /// <summary>
    /// 用户服务
    /// </summary>
    public interface IUserService
    {
        /// <summary>
        /// 新增用户
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<Guid> AddAsync(AddUserModel model);

        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task EditAsync(EditUserModel model);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(Guid id);

        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        Task<UserRoleListDTO> GetUserRoleListAsync(Guid userID);

        /// <summary>
        /// 查询用户信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<(List<UserListDTO>, PageResultModel)> QueryAsync(QueryUserModel model);

        /// <summary>
        /// 密码验证
        /// </summary>
        /// <param name="accountNumber"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        Task<UserListDTO> PasswordAertificationAsync(string accountNumber, string password);

        /// <summary>
        /// 通过角色Code为新增用户角色
        /// </summary>
        /// <param name="codes"></param>
        /// <returns></returns>
        Task AddUserRoleByRoleCodeAsync(List<Guid> userIDs, List<string> codes);

        /// <summary>
        /// 通过角色Code为删除用户角色
        /// </summary>
        /// <param name="codes"></param>
        /// <returns></returns>
        Task DeleteUserRoleByRoleCodeAsync(List<Guid> userIDs, List<string> codes);

        /// <summary>
        /// 获取用户功能
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="subsystemID"></param>
        /// <returns></returns>
        Task<UserActionInfoDTO> GetUserActionAsync(Guid userID, Guid subsystemID);

        /// <summary>
        /// 获取用户菜单列表
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="subsystemID"></param>
        /// <returns></returns>
        Task<UserMenuListDTO> GetUserMenuListAsync(Guid userID, Guid subsystemID);

        /// <summary>
        /// 获取用户菜单
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="subsystemID"></param>
        /// <returns></returns>
        Task<UserMenuTreeDTO> GetUserMenuTreeAsync(Guid userID, Guid subsystemID);

        /// <summary>
        /// 获取用户路由树
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="subsystemID"></param>
        /// <returns></returns>
        Task<UserRoutingTreeDTO> GetUserRoutingTreeAsync(Guid userID, Guid subsystemID);

        /// <summary>
        /// 获取用户路由列表
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="subsystemID"></param>
        /// <returns></returns>
        Task<UserRoutingListDTO> GetUserRoutingListAsync(Guid userID, Guid subsystemID);

        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<List<UserListDTO>> GetAsync(Guid[] ids);

    }
}